﻿package mortal.game.view.guide
{
    import com.mui.controls.*;
    import extend.language.*;
    import flash.events.*;
    import mortal.common.*;
    import mortal.game.view.common.*;
    import mortal.game.view.shop.*;

    public class BuyPropWin extends BuyItemWin
    {
        private var _box:GCheckBox;
        private var _todayNotTipsType:String = "";
        private static var _instance:BuyPropWin;

        public function BuyPropWin()
        {
            this.title = Language.getString(21016);
            return;
        }// end function

        public function get todayNotTipsType() : String
        {
            return this._todayNotTipsType;
        }// end function

        public function set todayNotTipsType(param1:String) : void
        {
            this._todayNotTipsType = param1;
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._box = UIFactory.checkBox(Language.getString(21017), 109, 136, 200, 28, this);
            this._box.drawNow();
            this._box.configEventListener(Event.CHANGE, this.checkBoxChangeHander);
            return;
        }// end function

        private function checkBoxChangeHander(event:Event) : void
        {
            if (this._todayNotTipsType == null || this._todayNotTipsType == "")
            {
                return;
            }
            PulseSharedObject.save(this._todayNotTipsType, this._box.selected);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._box.dispose(param1);
            this._box = null;
            this._todayNotTipsType = null;
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            super.clickHandler(event);
            return;
        }// end function

        public static function get isViewShow() : Boolean
        {
            return _instance && !_instance.isHide;
        }// end function

        public static function get instance() : BuyPropWin
        {
            if (_instance == null)
            {
                _instance = new BuyPropWin;
            }
            return _instance;
        }// end function

    }
}
